home *** CD-ROM | disk | FTP | other *** search
- using System;
- using System.Collections;
- using System.Text;
- using System.Web;
-
- /// <summary>
- /// This class is used to create the guide listing.
- /// </summary>
- namespace gbweb.classes
- {
- public class GuideListing
- {
- private GuideListingDiv Div;
- private GuideListingLine Line;
- private GuideListingChannel Channel;
- private GuideListingShowTimes Showtimes;
- private StringBuilder Lines;
- private string divHold = string.Empty;
- private HttpResponse response;
-
- public GuideListing(HttpResponse Response)
- {
- Div = new GuideListingDiv();
- Line = new GuideListingLine();
- Channel = new GuideListingChannel();
- Showtimes = new GuideListingShowTimes();
- Lines = new StringBuilder();
- response = Response;
- }
-
- public GuideListing(HttpResponse Response, GuideListingShowTimes showtimes, GuideListingDiv div, GuideListingLine line,GuideListingChannel channel)
- {
- Showtimes = showtimes;
- Div = div;
- Line = line;
- Channel = channel;
- Lines = new StringBuilder();
- response = Response;
- }
-
- public string getGuide()
- {
- //string returnLine = string.Empty;
- //for (int i = 0; i < Lines.Count; i++ )
- //{
- // returnLine += Lines[i]+ "\n";
- // //response.Write(Lines[i]+ "\n");
- //}
- return Lines.ToString();
- }
-
- public void addStartDivLine(string divId, string divClass)
- {
- GuideListingDiv div = new GuideListingDiv(divId, divClass);
- Lines.Append(div.getStartDiv()+ "\n");
- }
-
- public void addEndDivLine()
- {
- GuideListingDiv div = new GuideListingDiv();
- Lines.Append(div.getEndDiv() + "\n");
- }
-
- public void addShowtimesLineLeftCorner(int CornerWidth, bool ShowLeftScroll)
- {
- Showtimes.setCornerWidth(CornerWidth);
- Lines.Append(Showtimes.getShowtimesCornerLine(ShowLeftScroll) + "\n");
- }
-
- public void addShowtimesLine(int ShowtimeMargin, int ShowtimeWidth, string ShowtimeTime)
- {
- Showtimes.setShowtimesMargin(ShowtimeMargin);
- Showtimes.setShowtimesWidth(ShowtimeWidth);
- Showtimes.setShowtimesTime(ShowtimeTime);
- Lines.Append(Showtimes.getShowtimesLine() + "\n");
- }
-
- //public void addShowtimesLine(GuideListingShowTimes showtimes, bool ShowLeftScroll)
- //{
- // Lines.Append(showtimes.getShowtimesCornerLine(ShowLeftScroll) + "\n");
- // Lines.Append(showtimes.getShowtimesLine() + "\n");
- //}
-
- public void addDisplayLine(string DisplayClass, int Margin, int Width, string ProgrammeInfo)
- {
- Line.setDisplayClass(DisplayClass);
- Line.setDisplayMargin(Margin);
- Line.setDisplayWidth(Width);
- Line.setProgrammeInfo(ProgrammeInfo);
- Lines.Append(Line.getDisplayLine() + "\n");
- }
-
- public void addDisplayLine(GuideListingLine line)
- {
- Lines.Append(line.getDisplayLine());
- }
-
- public void addDisplayChannel(string DisplayClass, string DisplayTitle, int displayWidth, string chnlHref,
- string chnlNumber, string chnlName, string ChannelLogoHref, string ChannelLogoImgSrc)
- {
- Channel.setDisplayClass(DisplayClass);
- Channel.setDisplayTitle(DisplayTitle);
- Channel.setDisplayWidth(displayWidth);
- Channel.setChannelHref(chnlHref);
- Channel.setChannelName(chnlName);
- Channel.setChannelNumber(chnlNumber);
- Channel.setChannelLogHref(ChannelLogoHref);
- Channel.setChannelLogoImgSrc(ChannelLogoImgSrc);
-
- Lines.Append(Channel.getChannelLine() + "\n");
- }
-
- public void addDisplayChannel(GuideListingChannel channel)
- {
- Lines.Append(channel.getChannelLine() + "\n");
- }
-
- public void InitializeListingLine()
- {
- Line = new GuideListingLine();
- }
-
- public void InitializeChannelLine()
- {
- Channel = new GuideListingChannel();
- }
-
- public void Initailize()
- {
- Showtimes = new GuideListingShowTimes();
- Div = new GuideListingDiv("", "");
- Line = new GuideListingLine();
- Channel = new GuideListingChannel();
- Lines = new StringBuilder();
- }
- }
- }
-